import { _request } from "./request";

// 上传API
const uploadAPI = {
  //场所图片上传
  uploadVenuePicture: (file) => {
      const formVenueData =  new FormData();
      formVenueData.append("files", file.file);
      console.log('发送场所图片的参数:',formVenueData.get("files"));

      return _request('/venue/upload', formVenueData);
  },

  //创作者图片上传
  uploadCreatorPicture: (file) => {
     const formData =  new FormData();
     formData.append("files", file.file);
     console.log('发送创作者的参数:',formData.get("files"));
    return _request('/createor/upload', formData);
  }

}

export { uploadAPI }

